<!--
 @description 漫游按钮
 @fileName index.vue
 @author zengqiongying
 @created 2021/09/22 16:02:38
-->
<template>
  <div v-if="roamUrl" class="roam-btn" @click.stop="click3DHandle">
    <img src="@/assets/icon_roaming.png">
    720&deg;漫游
  </div>
</template>

<script>
export default {
  name: 'RoamBtn',
  props: {
    roamUrl: {
      type: String,
      default: ''
    }
  },
  data() {
    return {

    }
  },
  created() {},
  methods: {
    click3DHandle() {
      if (this.roamUrl) {
        // this.$openPage(this.roamUrl)
        this.$router.push({ name: 'Outsite', query: { src: this.roamUrl }})
      }
    }
  }
}

</script>
<style lang='less' scoped>
.roam-btn{
  position: absolute;
  z-index:9;
  color: #fff;
  background-color: rgba(0,0,0,.4);
  height: 24px;
  padding: 0 6px;
  line-height: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  img{
    width: 14px;
    height: 14px;
    margin-right: 3px;
  }
}
</style>
